﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace OnlineCourse.API.Helper
{
    /// <summary>
    /// 验证错误
    /// </summary>
    public class ValidationError
    {
        //常量
        #region Constants
        public static class Type
        {
            public static string Input = "Input";
            public static string System = "System";
            public static string Business = "Business";
        }
        #endregion

        //属性
        #region Properties
        public string ErrorType { get; set; }//错误类型
        public int ErrorCode { get; set; }//错误代码
        public object Source { get; set; }//来源
        public string ErrorMessage { get; set; }//错误信息
        #endregion

        //构造函数
        #region Constructor
       
        public ValidationError(string type, int code, object source, string message)
        {
            ErrorType = type;
            ErrorCode = code;
            Source = source;
            ErrorMessage = message;
        }
        #endregion
    }
}
